import 'package:flutter/material.dart';

// 定义有状态组件
// 快捷键：fstfull，得安装插件：Flutter Widget Snippets
class HomePage05 extends StatefulWidget {
  const HomePage05({Key? key}) : super(key: key);

  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage05> {
  // 状态变量
  int count = 0;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Image组件', style: TextStyle(color: Colors.white)),
        backgroundColor: Colors.blue,
      ),
      body: Column(
        children: [
          Container(
            width: 200,
            height: 300,
            color: Colors.green,
            child: Image.network(
              'https://yanxuan-item.nosdn.127.net/e529b6ab111ade9da9314867f98d360f.png',
              fit: BoxFit.cover,
            ),
          ),
          Container(
            width: 200,
            height: 200,
            color: Colors.green,
            child: Image.asset('assets/qiche.png'),
          ),
        ],
      ),
    );
  }
}
